package eteam.aps.systemservice.dal;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import eteam.aps.systeminterface.model.entity.ParamEntity;
import eteam.aps.systemservice.dal.mapper.IParamMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ParamDal {

    @Autowired
    private IParamMapper paramMapper;

    /**
     * 判断是否需要强制加密
     *
     * @return 系统参数
     */
    public int getOne() {
        return paramMapper.selectCount(new LambdaQueryWrapper<ParamEntity>()
                .ne(ParamEntity::getfState, ParamEntity.FSTATE_DELETED)
                .eq(ParamEntity::getPA001, "1"));
    }

}
